package com.squapsource.project_euler;

public class Problem19 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		int sum = 0;
		int day = 2;
		for (int i = 1; i <= 100; i++) {
			for (int j = 0; j < 12; j++) {
				if (j == 8 || j == 3 || j == 5 || j == 10) {
					day = (day + 30) % 7;
				} else if (j == 1) {
					int febDays = i % 4 == 0 ? 29 : 28;
					day = (day + febDays) % 7;
				} else {
					day = (day + 31) % 7;
				}
				if (day == 0)
					sum++;
			}
		}

		System.out.println(sum);

	}

}
